package com.fujitsu.cn.fnst.velocity.tool;

import java.util.List;

import org.apache.velocity.tools.config.DefaultKey;
import org.apache.velocity.tools.generic.SafeConfig;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Scope;

import com.fujitsu.cn.fnst.entiy.OperateLog;
import com.fujitsu.cn.fnst.service.LogService;

@Configurable("logTool")
@DefaultKey("logTool")
@Scope
@DependsOn
public class LogTool extends SafeConfig {
    private LogService logService;

    public List<OperateLog> getAllLogs() {
        return logService.getAllLogsByWhereAndOrder(null, "createtime desc");
    }
    public LogService getLogService() {
        return logService;
    }

    public void setLogService(LogService logService) {
        this.logService = logService;
    }
}
